home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / flilib.zip / PLAY.C < prev    next >
C/C++ Source or Header  |  1990-02-20  |  655b  |  30 lines

  1. /* play.c - play a fli until key is hit. */
  2.  
  3. #include "aafli.h"
  4.  
  5. main(int argc, char *argv[])
  6. {
  7. int ivmode;
  8. Errval err;
  9.  
  10. if (argc != 2)        /* If command line looks wrong give a little help */
  11.     {
  12.     puts("Play will play a FLI file until a key is hit");
  13.     puts("Example usage: play pretty.fli");
  14.     }
  15. else
  16.     {
  17.     ivmode = dos_get_vmode();        /* Get video mode so can restore at exit */
  18.     dos_set_vmode(0x13);            /* Go into 320x200 256 color mode */
  19.     if (dos_get_vmode() == 0x13)
  20.         {
  21.         err = fli_play(argv[1]);
  22.         dos_set_vmode(ivmode);
  23.         if (err < AA_SUCCESS)
  24.             puts(fli_error_message(err) );
  25.         }
  26.     else
  27.         puts("Not a vga/mcga display");
  28.     }
  29. }
  30.